package org.wangyuhang;

import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.wangyuhang.service.impl.testServiceImpl;
import org.wangyuhang.service.testService;

import javax.sql.DataSource;
import java.sql.SQLException;

public class test3 {
    public static void main(String[] args) throws SQLException {
        ApplicationContext applicationContext=new AnnotationConfigApplicationContext(SpringConfig.class);
//        System.out.println(SpringConfig.class);
        DataSource dataSource = applicationContext.getBean(DataSource.class);
        dataSource.getConnection();
        System.out.println(dataSource);


    }
}
